Skip to content

fix(content-guards): set correct per-repo limits (100 issues, 15 PRs)#134

Merged
JacobPEvans merged 3 commits intomainfrom
feature/raise-issue-limit
Mar 17, 2026
Merged

fix(content-guards): set correct per-repo limits (100 issues, 15 PRs)#134
JacobPEvans merged 3 commits intomainfrom
feature/raise-issue-limit

Conversation

@JacobPEvans
Copy link
Owner

@JacobPEvans JacobPEvans commented Mar 17, 2026

PR #134: Raise Issue and PR Hard Limits

Summary

Corrects hard limits for issue and PR creation enforcement in enforce-issue-limits.py:

  • Issues: 50 → 100 total open (hard limit)
  • PRs: 50 → 15 total open (hard limit)
  • AI-created PRs: 25 → 15 (capped at total PR limit, not independent)

Also updates test coverage to verify new limits and improves fake gh mock to support state-aware responses (--state all for rate-limit testing).

Changes

enforce-issue-limits.py:

  • Line 33: HARD_LIMITS = {"issue": (100, 25), "pr": (15, 15)}
    • Issues: 100 total, 25 AI-created
    • PRs: 15 total, 15 AI-created (sublimit capped at total)
  • Docstring updated to reflect new limits (lines 8–11)

enforce-issue-limits.bats:

  • Enhanced fake gh to support state-aware responses via GH_RESPONSE_ALL variable (lines 25–26)
  • TC3: Updated to verify 100-issue hard limit (lines 98–105)
  • TC4: AI-created limit test unchanged (25 issues)
  • TC6: PR rate-limit test now uses state-aware fake gh to distinguish open (14) vs. all-state (25) counts
  • All existing tests pass with new limits

Test Plan

  • Verify hard limits in docstring match code (lines 8–11)
  • Verify HARD_LIMITS dict uses correct values
  • Run bats tests/content-guards/enforce-issue-limits/enforce-issue-limits.bats — all 19 tests pass
  • Confirm rate-limit logic still works with state-aware gh mock

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings March 17, 2026 02:12
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses the need to accommodate a higher volume of open issues and pull requests by raising the per-repository hard limit. The change primarily updates a configuration value and its corresponding documentation, allowing for increased activity without hitting artificial caps, particularly relevant for automated content generation workflows.

Highlights

  • Issue/PR Hard Limit: The total open issue/PR hard limit per repository has been increased from 50 to 150 in enforce-issue-limits.py.
  • Documentation Update: The docstring within enforce-issue-limits.py has been updated to reflect the new hard limit of 150.
Changelog
  • content-guards/scripts/enforce-issue-limits.py
    • Increased the hard limit for total open issues/PRs in the docstring from 50 to 150.
    • Modified the HARD_LIMITS constant to reflect the new limit of 150 for issues and PRs.
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly increases the hard limit for open issues and pull requests from 50 to 150 in the script and its docstring. However, the automated tests that verify this limit have not been updated, which will cause the build to fail. I've provided a comment on the relevant line with details on which tests to update. I also included a suggestion to refactor the hardcoded limits into named constants to improve code clarity and maintainability.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the content-guards issue/PR creation limiter to allow more open work items per repository by increasing the configured hard limit.

Changes:

  • Updated the documented hard limit from 50 to 150 total open issues/PRs.
  • Increased HARD_LIMITS for both issues and PRs from 50 to 150.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Previous PR raised both to 150 which was too high. Correct limits:
- Issues: 100 total open per repo (up from 50)
- PRs: 15 total open per repo (down from 50)
- AI-created: 25 each (unchanged)

(claude)
- AI-created sublimit for PRs was 25 but total PR limit is 15,
  making the sublimit unreachable dead code. Capped at 15.
- Updated TC3/TC10 from 50 to 100 for new issue hard limit
- Enhanced fake gh to support GH_RESPONSE_ALL for --state all queries
- Updated TC6 to test rate limit independently of hard limit

(claude)
@JacobPEvans JacobPEvans changed the title fix(content-guards): raise issue hard limit from 50 to 150 per repo fix(content-guards): set correct per-repo limits (100 issues, 15 PRs) Mar 17, 2026
@JacobPEvans JacobPEvans merged commit 484a868 into main Mar 17, 2026
5 checks passed
@JacobPEvans JacobPEvans deleted the feature/raise-issue-limit branch March 17, 2026 02:55
JacobPEvans added a commit that referenced this pull request Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants